﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using SmartCity.Shared;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;

namespace MetroManagement
{
    /// <summary>
    /// 失物控制器
    /// </summary>
    [RemoteService]
    [Area("metroManagement")]
    [Route("api/metroManagement/founds")]
    public class FoundController : AbpController, IFoundAppService
    {
        private readonly IFoundAppService _foundAppService;

        public FoundController(
            IFoundAppService foundAppService)
        {
            _foundAppService = foundAppService;
        }

        // 列表
        [HttpGet]
        [Route("list")]
        public Task<ResultResponse<IList<FoundGroupDto>>> ListAsync()
        {
            return _foundAppService.ListAsync();
        }

        // 获取
        [HttpGet]
        [Route("{id:int}")]
        public Task<ResultResponse<FoundDto>> GetAsync(int id)
        {
            return _foundAppService.GetAsync(id);
        }
    }
}